<cfparam default="none" name="url.api" />
<cfparam default="-1" name="url.StepID" />
<cfset Creation = CreateObject("component", "cfc.Creation").init(url.StepID) />

<cfif url.api eq "AD_creation" >    
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST" >
            <cfsetting enablecfoutputonly="true">            
            <cfoutput>#SerializeJSON(Creation.ADCreation(), true)#</cfoutput>
        </cfcase>    
    </cfswitch>
</cfif>    

<cfif url.api eq "HRProd_creation" >    
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST" >
            <Cfset x = { MESSAGE = "<strong>Account Created Successfully<\/strong>", STATUS = "Created", RESULT = 1.0} />
            <cfsetting enablecfoutputonly="true">            
            <!---<cfoutput>#SerializeJSON(Creation.HRCreation(), true)#</cfoutput>--->
            <cfoutput>#SerializeJSON(x)#</cfoutput>
            
        </cfcase>            
    </cfswitch>        
</cfif>    

<cfif url.api eq "Rosetta_creation" >    
    <cfswitch expression="#CGI.REQUEST_METHOD#"> 
        <cfcase value="POST" >
            <cfsetting enablecfoutputonly="true">
            <cfoutput>#SerializeJSON(Creation.RosettaCreation(), true)#</cfoutput>
        </cfcase>            
    </cfswitch>      
</cfif>

<cfif url.api eq "Creation_Complete" >    
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST" >
            <cfsetting enablecfoutputonly="true">            
            <cfoutput>#SerializeJSON(Creation.CreationComplete(), true)#</cfoutput>
        </cfcase>            
    </cfswitch>      
</cfif>
